package week13.week_13_server;

import java.io.Serializable;

public class User implements Serializable{
	String userName;
	String password;
	int level=1;
	int exp=0;
	public User(String userName,String password){
		this.userName = userName;
		this.password = password;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String toString(){
		return "[" + userName + ", " + password + "]";
	}
	public void addExp(){
		exp += 1;
		if (exp >= 10*level){
			exp = 0;
			level += 1;
		}
	}

	public int getLevel() {
		return level;
	}

	public int getExp() {
		return exp;
	}
}
